﻿using Prism.Events;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using 基于WPF的电缆采样数据分析系统.Models.Enums;
using 基于WPF的电缆采样数据分析系统.MsgEvents;
using 基于WPF的电缆采样数据分析系统.ViewModels.TDRWork.MenuPage;

namespace 基于WPF的电缆采样数据分析系统.Views.TDRWork.MenuPage
{
    /// <summary>
    /// PassagePageUC.xaml 的交互逻辑
    /// </summary>
    public partial class PassagePageUC : UserControl
    {

        public PassagePageUC()
        {
            InitializeComponent();

            // 默认样式
            SelectedChannelFunBtnStyle();
        }

        /// <summary>
        /// 点击参考按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ReferenceFun_Click(object sender, RoutedEventArgs e)
        {
            ChannelDemo.Visibility = Visibility.Collapsed;
            ReferenceDemo.Visibility = Visibility.Visible;
            SelectedReferenceFunBtnStyle();
        }

        /// <summary>
        /// 点击通道按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ChannelFun_Click(object sender, RoutedEventArgs e)
        {
            ChannelDemo.Visibility = Visibility.Visible;
            ReferenceDemo.Visibility = Visibility.Collapsed;
            SelectedChannelFunBtnStyle();
        }

        /// <summary>
        /// 参考按钮样式
        /// </summary>
        private void SelectedReferenceFunBtnStyle()
        {
            ReferenceFun.BorderThickness = new Thickness(0, 0, 0, 4);
            ChannelFun.BorderThickness = new Thickness(0);
        }

        /// <summary>
        /// 通道按钮样式
        /// </summary>
        private void SelectedChannelFunBtnStyle()
        {
            ReferenceFun.BorderThickness = new Thickness(0);
            ChannelFun.BorderThickness = new Thickness(0, 0, 0, 4);
        }

        

    }
}
